import Vue from 'vue'
// 导入路由
import VueRouter from 'vue-router'
Vue.use(VueRouter)

// 1.导入组件
import login from '../views/login.vue'
// 2.定义路由规则
const routes = [
  {
    name: 'login',
    path: '/login',
    component: login
  }
]

// 3.创建路由实例
const router = new VueRouter({
  routes
})

// 导出路由
export default router
